export const isObj = (obj) => {
  return Object.prototype.toString.call(obj) === '[object Object]';
}

/**
 * 获得事件委托的子元素下标
 * @param _this
 * @param target
 * @returns {number}
 */
export const getDelIndex = (_this, target, targetClassName) => {
  return Array.prototype.indexOf.call(_this.getElementsByClassName(targetClassName), target);
}

export const hasClass = (ele, target) => {
  return ele && target ? ele.classList.contains(target) : false;
};
